Skip to content

rngtest, run-test.sh: Robust error handling, dependency SKIP, and summary improvements #85

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 17, 2025

Conversation

smuppand
Copy link
Contributor

This PR enhances the Kernel rngtest test script and the main run-test.sh runner with several reliability, logging, and error-handling improvements:

  • rngtest/run.sh:

    • Uses dd instead of cat to reliably generate input entropy, preventing hangs or input depletion from /dev/random.
    • Adds stricter dependency checks (for both rngtest and dd) and SKIP logic if binaries are missing.
    • Provides clear error handling and logs if reading, executing, or parsing results fails.
    • Cleans up all temporary files after execution, whether PASS or FAIL.
    • Explicitly validates and logs the parsed bit error count, failing gracefully if output is invalid.
  • run-test.sh:

    • Correctly recognizes and propagates SKIP status from test scripts (e.g., when dependencies are missing).
    • Does not treat SKIP as PASS in summaries.
    • Prints clear test summary sections for PASSED, FAILED, and SKIPPED tests.
    • Improves modularity and logging to assist with CI pipeline diagnostics.

Together, these changes ensure test results reflect true execution status and failures, reduce flakiness in CI, and allow for more consistent debugging and summary reporting.


Tested on multiple setups with and without missing dependencies, and confirmed proper SKIP and summary behavior.


- rngtest/run.sh: Use dd to source entropy data for more reliable testing, improve output parsing, and enhance error handling for missing or malformed rngtest output.
- run-test.sh: Detect and report SKIP results in test summary by parsing .res files, so that SKIPped tests are no longer counted as pass or fail.
- Print SKIPPED section in summary for clearer CI/test visibility.
- Ensures correct reporting of pass, fail, and skip for all test cases, and makes rngtest reliable across platforms.

Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
@smuppand smuppand requested a review from abbajaj806 June 17, 2025 09:35
@abbajaj806 abbajaj806 merged commit 3d52665 into qualcomm-linux:main Jun 17, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants